<?php


    // Author: Tomasz Durka
    // Creation date: 15th August 2009
    // Prints out Javascript code updating $('notice')
    
    
  function js_set_notice($value) {
    $code = '<script language="javascript">';
    
    // Setting up content
    $code .= "$('notice').update('{$value}');";
    $code .= "$('notice').show();";
    $code .= "$('notice').style.marginLeft= -$('notice').getWidth()/2 + 'px';";
    
    
    $code .= '</script>';
    
    return $code;
  }

?>